package com.mdata.common;

import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DefinitionException extends RuntimeException{

    protected Integer errorCode;
    protected String errorMsg;

    public DefinitionException(ResponseEnum responseEnum){
        this.setErrorCode(responseEnum.getCode());
        this.setErrorMsg(responseEnum.getMsg());
    }
}
